home *** CD-ROM | disk | FTP | other *** search
/ World of Education / World of Education.iso / world_m / mathpl20.zip / MATHPLOT.FUN < prev    next >
Text File  |  1991-09-12  |  2KB  |  158 lines

  1. CLEAR
  2. DISPLAY
  3. DISPLAY
  4. DISPLAY
  5. DISPLAY
  6. DISPLAY MATHPLOT example functions.
  7. DISPLAY Press Enter to move on to next function.
  8. DISPLAY
  9. pause 30
  10.  
  11. RESET
  12. DISPLAY Damped oscillations
  13. TITLE Damped oscillations
  14. Y = EXP(-.2*X)*COS(X)
  15. DOMAIN 0,6*PI
  16. PLOT 30
  17.  
  18. RESET
  19. DISPLAY Second and third order Butterworth filters
  20. TITLE Second and third order Butterworth filters
  21. Y1=1/SQRT(1+(X/2000)^4)
  22. Y2=1/SQRT(1+(X/2000)^6)
  23. DOMAIN 0,8000
  24. NUMPOINTS 100
  25. LABEL ON
  26. GRID ON
  27. PLOT 30
  28.  
  29. RESET
  30. DISPLAY Fourth order Chebyshev low-pass filter
  31. TITLE Fourth order Chebyshev low-pass filter
  32. CTITLE 7
  33. y=1/SQRT(1+P0^2*T(P1,X/P3)^2)
  34. CF1 2
  35. DOMAIN 0,4000
  36. NUMPOINTS 100
  37. P0 0.5
  38. P1 4
  39. P3 2000
  40. LABEL ON
  41. CAXES 3
  42. GRID ON
  43. CGRID 8
  44. PLOT 30
  45.  
  46. RESET
  47. DISPLAY Fourier series approximation of square wave
  48. TITLE Fourier series approximation of square wave
  49. Y1 = SIN(X) + SIN(3*X)/3 + SIN(5*X)/5 + SIN(7*X)/7
  50. Y2 = PULSE(0,X,PI) - PULSE(PI,X,2*PI)
  51. DOMAIN .001,2*PI+.001
  52. NUM 200
  53. LABELS ON
  54. GRID ON
  55. PLOT 30
  56.  
  57. RESET
  58. DISPLAY Cubic equation
  59. TITLE Cubic equation: Y = 2*X^3 + 50*X^2 + 100*X + 5000
  60. CTITLE 7
  61. Y=2*X^3+50*X^2+100*X+5000
  62. DOMAIN -30,18
  63. NUMPOINTS 100
  64. LABEL ON
  65. GRID ON
  66. PLOT 30
  67.  
  68. RESET
  69. DISPLAY Hyperbolic function: X * Y = 5
  70. TITLE Hyperbolic function:  X * Y = 5
  71. Y1=5/T
  72. X1=T
  73. CF1 2
  74. Y2=-5/T
  75. X2=-T
  76. CF2 2
  77. DOMAIN 0.5,10
  78. COMMONSCALE ON
  79. PLOT 30
  80.  
  81. RESET
  82. DISPLAY Hypocycloid of four cusps
  83. TITLE Hypocycloid of four cusps (Astroid)
  84. CTITLE 4
  85. y=SIN(T)^3
  86. x=COS(T)^3
  87. CF1 2
  88. DOMAIN 0,6.28319
  89. NUMPOINTS 100
  90. CAXES 1
  91. COMMONSCALE ON
  92. PLOT 30
  93.  
  94. RESET
  95. DISPLAY Reciprocal of Gamma function
  96. TITLE Reciprocal of Gamma function
  97. CTITLE 7
  98. y=GAMMAI(X)
  99. CF1 2
  100. DOMAIN -4,6
  101. NUMPOINTS 100
  102. LABEL ON
  103. CAXES 3
  104. GRID ON
  105. CGRID 8
  106. COMMONSCALE OFF
  107. ORIGIN OFF
  108. PLOT 30
  109.  
  110. RESET
  111. DISPLAY Normal probability distribution function
  112. TITLE Normal probability distribution function
  113. Y=NORMAL(X)
  114. DOMAIN -4,4
  115. NUMPOINTS 150
  116. PLOT 30
  117.  
  118. RESET
  119. DISPLAY Now, a little "art"
  120. pause 3
  121. R=2*SIN(2*A)
  122. CF1 3
  123. DOMAIN 0,2000
  124. NUMPOINTS 500
  125. AXES OFF
  126. PLOT 30
  127.  
  128. RESET
  129. y=SIN(T)^3
  130. x=COS(T)^3
  131. CF1 2
  132. DOMAIN 0,4000
  133. NUMPOINTS 500
  134. AXES OFF
  135. GRID OFF
  136. COMMONSCALE ON
  137. PLOT 30
  138.  
  139. RESET
  140. y=5*SIN(T)-SIN(5*T)
  141. x=5*COS(T)-COS(5*T)
  142. CF1 3
  143. DOMAIN 0,6000
  144. NUMPOINTS 400
  145. AXES OFF
  146. COMMONSCALE ON
  147. PLOT 30
  148.  
  149. DISPLAY
  150. DISPLAY
  151. DISPLAY End of example plots.
  152. DISPLAY Type or edit MATHPLOT.FUN to see the function descriptions.
  153. DISPLAY The file MATHPLOT.DOC contains a tutorial and full instructions.
  154. DISPLAY
  155. DISPLAY
  156. EXIT
  157.  
  158.